#!/bin/bash

BASE_ANN_DIR=$1

CNT_ALL=$(ls ${BASE_ANN_DIR}/src | wc -l)
CNT_ANNOTATED=$(cat ${BASE_ANN_DIR}/results_go_exact.txt | wc -l)
CNT_ANNOTATED_UNIQ=$(cat ${BASE_ANN_DIR}/results_go_exact.txt | cut -f1 | sort | uniq | wc -l)

CHECK='ERROR'
if [[ $CNT_ANNOTATED -eq $CNT_ALL ]] ; then
    if [[ $CNT_ANNOTATED -eq $CNT_ANNOTATED_UNIQ ]] ; then
        CHECK='OK'
    fi
fi

echo -e "${BASE_ANN_DIR}\t$CHECK\t${CNT_ALL}\t${CNT_ANNOTATED}\t${CNT_ANNOTATED_UNIQ}"

